"""
Standardized API response helpers
"""

from flask import jsonify

def success_response(data=None, message='success', code=200):
    """
    Standard success response format
    """
    response = {
        'code': code,
        'message': message,
        'data': data
    }
    return jsonify(response), code

def error_response(message='error', code=400, data=None):
    """
    Standard error response format
    """
    response = {
        'code': code,
        'message': message,
        'data': data
    }
    return jsonify(response), code

